# 5.8
names = ['zhu', 'hao', 'han', 'shi', 'admin']
for name in names:
    if name.lower() == 'admin'.lower():
        print('Hello admin, would you like to see a status report?')
    else:
        print(f'Hello {name}, thank you for logging in again.')

# 5.9
names = []
if names:
    for name in names:
        if name.lower() == 'admin'.lower():
            print('Hello admin, would you like to see a status report?')
        else:
            print(f'Hello {name}, thank you for logging in again.')
else:
    print("we need to find some users")

# 5.10
currents_users = ['zhu', 'hao', 'han', 'shi', 'admin']
new_users = ['zhu', 'hao', 'sun', 'xu', 'hang']
for user in new_users:
    if user.lower() in currents_users[:]:
        print("已存在，更换")
    else:
        print("未被使用")

# 5.11
nums = list(range(1,10))
for num in nums:
    if num == 1:
        print(f"{num}st")
    elif num == 2:
        print(f"{num}nd")
    elif num == 3:
        print(f"{num}rd")
    else:
        print(f"{num}th")